/**
 * Created with IntelliJ IDEA.
 * Description:邮箱验证
 * User: zjc
 * Date: 2022-04-27
 * Time: 19:28
 */
import java.util.Scanner;

public class Project {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();
        String emailMatcher="[a-zA-Z0-9]+@[a-zA-Z0-9]+\\.[a-zA-Z0-9]+";

        //利用matches()方法进行正则匹配，如果合法，则输出"邮箱格式合法"，否则输出"邮箱格式不合法"
        System.out.println(str.matches(emailMatcher)?"邮箱格式合法":"邮箱格式不合法");

    }
}

